
<?php echo $this->fetch('header.php'); ?>
<div class="layout-box">
	<div class='layout-body'>
	<?php if ($this->_var['link']): ?>
	<form action="?action=link&do=link_delete" method="post" id="link_form">
	<table cellspacing="0" cellpadding="0" width="100%" class="table">
		<thead>
		<tr>
		<th width="80" align="center" nowrap="nowrap">排序</th>
		<th align="left">链接名称</td>

		<th align="center" width="140">操作</td>
		</tr>
		</thead>
		<tbody>
		<?php $_from=$this->_var['link']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('$attrs[key]', '$attrs[item]');if (count($_from)):
    foreach ($_from AS $this->_var['link_0_31282400_1333200439']):
?>
		<tr>
		<td align="center" ><?php echo $this->_var['link_0_31282400_1333200439']['sort']; ?></td>
		<td><a href="?action=link&do=link_edit&link_id=<?php echo $this->_var['link_0_31282400_1333200439']['id']; ?>" style="font-weight:bold;color:#B5D53B"><?php echo $this->_var['link_0_31282400_1333200439']['name']; ?></a><?php if ($this->_var['link_0_31282400_1333200439']['text']): ?>&nbsp;(<?php echo $this->_var['link_0_31282400_1333200439']['text']; ?>)<?php endif; ?></td>

		<td align="right">
			<a href="?action=link&do=link_edit&link_id=<?php echo $this->_var['link_0_31282400_1333200439']['id']; ?>" class="button">编辑</a>
			<a href="?action=link&do=link_delete&link_id=<?php echo $this->_var['link_0_31282400_1333200439']['id']; ?>" class="button" onclick="return confirm('确定要删除吗？')">删除</a>
		</td>
		</tr>
		<?php endforeach; endif; unset($_from); ?><?php $this->pop_vars();?>
		</tbody>

	</table>
	</form>
	<?php else: ?>
	<div style="line-height:50px;text-align:center;">暂无数据</div>
	<?php endif; ?>
	</div>
</div>
<div style="text-align:right">
<a class="button" href="?action=link&do=link_add">添加链接</a>
</div>